home *** CD-ROM | disk | FTP | other *** search
- /* =============
- * AEAModel.cpp
- * =============
- */
-
- #include "AEADebugging.h"
-
- #include <AEBuild.h>
-
- #include "AEAModel.hh"
- #include "AEATokenModel.hh"
- #include "AEADesc.hh"
-
- void
- AEAModel::GetKeyData(DescType inKeyForm, AEDesc &outAEDesc) const
- {
- outAEDesc.descriptorType = typeNull;
- outAEDesc.dataHandle = NULL;
- }
-
- void
- AEAModel::MakeToken(AEATokenModel *&outToken)
- {
- outToken = new AEATokenModel(this);
- }
-
- void
- AEAModel::MakeObjSpecifier(AEDesc &outAEDesc) const
- {
- OSErr err;
- AEDesc containerSpec;
- DescType keyForm;
- AEADesc keyData;
-
- keyForm = PreferredKeyForm();
- GetKeyData(keyForm, keyData.Ref());
-
- GetContainerObjSpec(containerSpec);
-
- err = ::AEBuild(&outAEDesc,
- "obj{want:type(@), form:enum(@), seld:@, from:@}",
- Class(),
- keyForm,
- &keyData.Ref(),
- &containerSpec);
- ThrowIfOSErr_(err);
- }
-
- long
- AEAModel::CountElements(DescType inDesiredClass) const
- {
- ThrowOSErr_(errAEEventNotHandled);
- return 0; // happy compiler fix
- }
-
- void
- AEAModel::GetElementByIndex(DescType inDesiredClass, long inIndex, AEAModel *&outObject) const
- {
- ThrowOSErr_(errAEEventNotHandled);
- }
-
- void
- AEAModel::GetElementByName(DescType inDesiredClass, const AEADesc &inName, AEAModel *&outObject) const
- {
- ThrowOSErr_(errAEEventNotHandled);
- }
-
- void
- AEAModel::GetElementByID(DescType inDesiredClass, long inID, AEAModel *&outObject) const
- {
- ThrowOSErr_(errAEEventNotHandled);
- }
-
- void
- AEAModel::GetProperty(DescType inDesiredClass, DescType inPropertyID, AEAModel *&outObject) const
- {
- ThrowOSErr_(errAEEventNotHandled);
- }
-
- AEAModel *
- AEAModel::GetProperty(DescType inDesiredClass, DescType inPropertyID) const
- {
- AEAModel *model;
- GetProperty(inDesiredClass, inPropertyID, model);
- return model;
- }
-
- void
- AEAModel::MakeElement(DescType inNewClass /*, at*/ /*, with properties*/)
- {
- ThrowOSErr_(errAEEventNotHandled);
- }
-
- // FIXME: Get rid of this!
- void
- AEAModel::RespondToEvent(const AEADescAppleEvent *inAppleEvent, AEADescAppleEvent *outReply)
- {
- ThrowOSErr_(errAEEventNotHandled);
- }
-